//
// Decompiled by Jadx - 387ms
//
package me.plusne.GreenDao.dao;

import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;
import fm.b;
import org.greenrobot.greendao.database.DatabaseStatement;
import x.a;
import x.d;

public final class ChatLogDao extends a<b, Long> {
    public static final String TABLENAME = "CHAT_LOG";


    public class Properties {
        public static final d Id = new d(0, Long.class, "id", true, "_id");
        public static final d UserId = new d(1, String.class, "userId", false, "USER_ID");
        public static final d MsgId = new d(2, String.class, "msgId", false, "MSG_ID");
    }

    public ChatLogDao(g.a aVar) {
        super(aVar);
    }

    public static void createTable(org.greenrobot.greendao.database.Database aVar, boolean z) {
        String str;
        if (z) {
            str = "IF NOT EXISTS ";
        } else {
            str = "";
        }
        aVar.d("CREATE TABLE " + str + "\"CHAT_LOG\" (\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ,\"USER_ID\" TEXT,\"MSG_ID\" TEXT);");
        androidx.activity.b.v(new StringBuilder("CREATE INDEX "), str, "userId ON \"CHAT_LOG\" (\"USER_ID\" ASC);", aVar);
    }

    public static void dropTable(org.greenrobot.greendao.database.Database aVar, boolean z) {
        String str;
        StringBuilder sb = new StringBuilder("DROP TABLE ");
        if (z) {
            str = "IF EXISTS ";
        } else {
            str = "";
        }
        androidx.activity.b.v(sb, str, "\"CHAT_LOG\"", aVar);
    }

    public final void a(SQLiteStatement sQLiteStatement, Object obj) {
        b bVar = (b) obj;
        sQLiteStatement.clearBindings();
        Long l = bVar.a;
        if (l != null) {
            sQLiteStatement.bindLong(1, l.longValue());
        }
        String str = bVar.b;
        if (str != null) {
            sQLiteStatement.bindString(2, str);
        }
        String str2 = bVar.c;
        if (str2 != null) {
            sQLiteStatement.bindString(3, str2);
        }
    }

    public final void b(Object obj, DatabaseStatement cVar) {
        b bVar = (b) obj;
        cVar.k();
        Long l = bVar.a;
        if (l != null) {
            cVar.j(1, l.longValue());
        }
        String str = bVar.b;
        if (str != null) {
            cVar.i(2, str);
        }
        String str2 = bVar.c;
        if (str2 != null) {
            cVar.i(3, str2);
        }
    }

    public final Long c(Object obj) {
        b bVar = (b) obj;
        if (bVar != null) {
            return bVar.a;
        }
        return null;
    }

    public final Object d(Cursor cursor) {
        return new b(cursor.isNull(0) ? null : Long.valueOf(cursor.getLong(0)), cursor.isNull(1) ? null : cursor.getString(1), cursor.isNull(2) ? null : cursor.getString(2));
    }

    public final Long e(Cursor cursor) {
        if (cursor.isNull(0)) {
            return null;
        }
        return Long.valueOf(cursor.getLong(0));
    }

    public final Long f(long j, Object obj) {
        ((b) obj).a = Long.valueOf(j);
        return Long.valueOf(j);
    }
}
